package cc.mrbird.unit.service;

import cc.mrbird.common.domain.QueryRequest;
import cc.mrbird.system.domain.User;
import cc.mrbird.unit.domain.ContactInfor;
import cc.mrbird.unit.domain.UnitInfo;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@CacheConfig(cacheNames = "ContactInforService")
public interface ContactInforService {

    List<ContactInfor> findContactInforWithRole(ContactInfor contactInfor, QueryRequest request);

    ContactInfor findByName(String unit_name);
    @CacheEvict(allEntries = true)
    void add(ContactInfor contactInfor,User user);
    @CacheEvict(key = "#p0", allEntries = true)
    void update(ContactInfor contactInfor);
    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);

    @Cacheable(key = "#p0")
    public ContactInfor findById(Long id);

}
